package com.zhiche.lisa.bms.dao.model.invoice;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 申请开票主表
 * </p>
 *
 * @author hongbo
 * @since 2018-09-28
 */
@TableName("lisa_invoice_apply")
public class InvoiceApply extends Model<InvoiceApply> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 开票申请号
     */
	private String code;
    /**
     * 开票主键(下发过来)
     */
	@TableField("invoice_id")
	private String invoiceId;
    /**
     * 客户
     */
	private String client;
    /**
     * 客户id
     */
	@TableField("client_id")
	private Long clientId;
    /**
     * 开票单位名称
     */
	@TableField("units_name")
	private String unitsName;
    /**
     * 税号
     */
	private String tfn;
    /**
     * 供方名称
     */
	@TableField("customer_name")
	private String customerName;
    /**
     * 供方id
     */
	@TableField("customer_id")
	private Long customerId;
    /**
     * 开票金额
     */
	@TableField("sum_money")
	private BigDecimal sumMoney;
    /**
     * 扣款总金额
     */
	@TableField("charge_money")
	private BigDecimal chargeMoney;
    /**
     * 账单数量
     */
	@TableField("bill_num")
	private Integer billNum;
    /**
     * 实付金额
     */
	@TableField("pay_money")
	private BigDecimal payMoney;
    /**
     * 创建人
     */
	private Long creator;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
    /**
     * 税率
     */
	@TableField("tax_rate")
	private BigDecimal taxRate;
    /**
     * 快递单号
     */
	@TableField("tracking_num")
	private String trackingNum;
	/**
	 * 支付申请号, 多个逗号隔开
	 */
	@TableField("pay_apply_code_array")
	private String payApplyCodeArray;
    /**
     * 状态; 0-新增, 1-审核, 2-已结算, 3-已确认
     */
	private Integer status;
    /**
     * 审核时间
     */
	@TableField("audit_date")
	private Date auditDate;
    /**
     * 登记时间
     */
	@TableField("register_date")
	private Date registerDate;
	/**
	 * 租户id
	 */
	@TableField("tenant_id")
	private Long tenantId;

	/**
	 * 计划收票时间
	 */
	@TableField("plan_receipt_date")
	private Date planReceiptDate;

	public Date getPlanReceiptDate () {
		return planReceiptDate;
	}

	public void setPlanReceiptDate (Date planReceiptDate) {
		this.planReceiptDate = planReceiptDate;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getInvoiceId() {
		return invoiceId;
	}

	public void setInvoiceId(String invoiceId) {
		this.invoiceId = invoiceId;
	}

	public String getClient() {
		return client;
	}

	public void setClient(String client) {
		this.client = client;
	}

	public Long getClientId() {
		return clientId;
	}

	public void setClientId(Long clientId) {
		this.clientId = clientId;
	}

	public String getUnitsName() {
		return unitsName;
	}

	public void setUnitsName(String unitsName) {
		this.unitsName = unitsName;
	}

	public String getTfn() {
		return tfn;
	}

	public void setTfn(String tfn) {
		this.tfn = tfn;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public BigDecimal getSumMoney() {
		return sumMoney;
	}

	public void setSumMoney(BigDecimal sumMoney) {
		this.sumMoney = sumMoney;
	}

	public BigDecimal getChargeMoney() {
		return chargeMoney;
	}

	public void setChargeMoney(BigDecimal chargeMoney) {
		this.chargeMoney = chargeMoney;
	}

	public Integer getBillNum() {
		return billNum;
	}

	public void setBillNum(Integer billNum) {
		this.billNum = billNum;
	}

	public BigDecimal getPayMoney() {
		return payMoney;
	}

	public void setPayMoney(BigDecimal payMoney) {
		this.payMoney = payMoney;
	}

	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public BigDecimal getTaxRate() {
		return taxRate;
	}

	public void setTaxRate(BigDecimal taxRate) {
		this.taxRate = taxRate;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	public Date getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	public String getTrackingNum() {
		return trackingNum;
	}

	public void setTrackingNum(String trackingNum) {
		this.trackingNum = trackingNum;
	}

	public String getPayApplyCodeArray() {
		return payApplyCodeArray;
	}

	public void setPayApplyCodeArray(String payApplyCodeArray) {
		this.payApplyCodeArray = payApplyCodeArray;
	}

	@Override
	public String toString() {
		final StringBuffer sb = new StringBuffer("InvoiceApply{");
		sb.append("id=").append(id);
		sb.append(", code='").append(code).append('\'');
		sb.append(", invoiceId='").append(invoiceId).append('\'');
		sb.append(", client='").append(client).append('\'');
		sb.append(", clientId=").append(clientId);
		sb.append(", unitsName='").append(unitsName).append('\'');
		sb.append(", tfn='").append(tfn).append('\'');
		sb.append(", customerName='").append(customerName).append('\'');
		sb.append(", customerId=").append(customerId);
		sb.append(", sumMoney=").append(sumMoney);
		sb.append(", chargeMoney=").append(chargeMoney);
		sb.append(", billNum=").append(billNum);
		sb.append(", payMoney=").append(payMoney);
		sb.append(", creator=").append(creator);
		sb.append(", gmtCreate=").append(gmtCreate);
		sb.append(", taxRate=").append(taxRate);
		sb.append(", trackingNum='").append(trackingNum).append('\'');
		sb.append(", payApplyCodeArray='").append(payApplyCodeArray).append('\'');
		sb.append(", status=").append(status);
		sb.append(", auditDate=").append(auditDate);
		sb.append(", registerDate=").append(registerDate);
		sb.append(", tenantId=").append(tenantId);
		sb.append(", planReceiptDate=").append(planReceiptDate);
		sb.append('}');
		return sb.toString();
	}
}
